package cn.zjutleo.village_server.service;

import cn.zjutleo.village_server.entity.AddressData;
import cn.zjutleo.village_server.mapper.AddressDataMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: 张坤
 * @DateTime: 2021/9/30 12:34
 * @Description: 该类用于 TODO
 */
@Service
public class AddressDataService {
    @Resource
    AddressDataMapper addressDataMapper;

    public List<AddressData> getAllProvinces(){
        return addressDataMapper.getAllProvinces();
    }

    public List<AddressData> getCtites(String code){
        return addressDataMapper.getCtites(code);
    }

    public List<AddressData> getAreas(String code){
        return addressDataMapper.getAreas(code);
    }

    public List<AddressData> getStreets(String code){
        return addressDataMapper.getStreets(code);
    }

    public List<AddressData> getVillages(String code){
        return addressDataMapper.getVillages(code);
    }
}
